/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package horsechess.client.gui;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author Administrator
 */
public class GUIChessBoard extends JPanel {
 Image chessboard;

    public GUIChessBoard() {
        ImageIcon ii = new ImageIcon(getClass().getResource("/resource/chessboard/ChessBoard.PNG"));
        chessboard = ii.getImage();
        this.setLayout(null);
        JLabel picChessMan=new JLabel();
        picChessMan.setIcon(new ImageIcon(getClass().getResource("/resource/horse/BLUE.gif")));
        picChessMan.setBounds(305, 350, 33, 33);
        this.add(picChessMan);
    }

    @Override
    protected void paintComponent(Graphics g) {
         Graphics2D g2d = (Graphics2D) g;
           g2d.drawImage(chessboard, 0, 0, null);
    }


//    @Override
//    public void paint(Graphics g) {
//
//        Graphics2D g2d = (Graphics2D) g;
//        g2d.drawImage(chessboard, 0, 0, null);
//
//    }

    
}
